// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System;

namespace Wintellect.Touch
{
    /// <remarks>
    /// Brought over and augmented from the Silverlight for Windows Phone Toolkit, and subject to the license
    /// as outlined there.
    /// The namespace has been renamed to prevent any collisions that may occur if this assembly and the 
    /// Toolkit assembly are used in the same project.
    /// </remarks>
    public partial class GestureListener
    {
        #region GestureBegin event

        /// <summary>
        /// The GestureBegin event.
        /// </summary>
        public event EventHandler<GestureEventArgs> GestureBegin
        {
            add { GestureBeginEventHandler += value; }
            remove { GestureBeginEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the gesture begin event handler.
        /// </summary>
        /// <value>The gesture begin event handler.</value>
        internal EventHandler<GestureEventArgs> GestureBeginEventHandler { get; private set; }
        #endregion

        #region GestureCompleted event
        /// <summary>
        /// The GestureCompleted event.
        /// </summary>
        public event EventHandler<GestureEventArgs> GestureCompleted
        {
            add { GestureCompletedEventHandler += value; }
            remove { GestureCompletedEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the gesture completed event handler.
        /// </summary>
        /// <value>The gesture completed event handler.</value>
        internal EventHandler<GestureEventArgs> GestureCompletedEventHandler { get; private set; }
        #endregion

        #region Tap Event
        /// <summary>
        /// The Tap event (touch, release, no movement).
        /// </summary>
        public event EventHandler<GestureEventArgs> Tap
        {
            add { TapEventHandler += value; }
            remove { TapEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the tap event handler.
        /// </summary>
        /// <value>The tap handler.</value>
        internal EventHandler<GestureEventArgs> TapEventHandler { get; private set; }
        #endregion

        #region DoubleTap Event
        /// <summary>
        /// The DoubleTap event is raised instead of Tap if the time between two taps is short eonugh.
        /// </summary>
        public event EventHandler<GestureEventArgs> DoubleTap
        {
            add { DoubleTapEventHandler += value; }
            remove { DoubleTapEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the double tap event handler.
        /// </summary>
        /// <value>The double tap event handler.</value>
        internal EventHandler<GestureEventArgs> DoubleTapEventHandler { get; private set; }
        #endregion

        #region Hold Event
        /// <summary>
        /// The Hold event (touch and hold for one second)
        /// </summary>
        public event EventHandler<GestureEventArgs> Hold
        {
            add { HoldEventHandler += value; }
            remove { HoldEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the hold event handler.
        /// </summary>
        /// <value>The hold event handler.</value>
        internal EventHandler<GestureEventArgs> HoldEventHandler { get; private set; }
        #endregion

        #region DragStarted Event
        /// <summary>
        /// The DragStarted event.
        /// </summary>
        public event EventHandler<DragStartedGestureEventArgs> DragStarted
        {
            add { DragStartedEventHandler += value; }
            remove { DragStartedEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the drag started event handler.
        /// </summary>
        /// <value>The drag started event handler.</value>
        internal EventHandler<DragStartedGestureEventArgs> DragStartedEventHandler { get; private set; }
        #endregion

        #region DragDelta event

        /// <summary>
        /// The DragDelta event.
        /// </summary>
        public event EventHandler<DragDeltaGestureEventArgs> DragDelta
        {
            add { DragDeltaEventHandler += value; }
            remove { DragDeltaEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the drag delta event handler.
        /// </summary>
        /// <value>The drag delta event handler.</value>
        internal EventHandler<DragDeltaGestureEventArgs> DragDeltaEventHandler { get; private set; }
        #endregion

        #region DragCompleted event
        /// <summary>
        /// The DragCompleted event. Will be raised on touch release after a drag, or
        /// when a second touch point is added.
        /// </summary>
        public event EventHandler<DragCompletedGestureEventArgs> DragCompleted
        {
            add { DragCompletedEventHandler += value; }
            remove { DragCompletedEventHandler -= value; }
        }

        /// <summary>
        /// Gets or sets the drag completed event handler.
        /// </summary>
        /// <value>The drag completed event handler.</value>
        internal EventHandler<DragCompletedGestureEventArgs> DragCompletedEventHandler { get; private set; }
        #endregion

        //#region SimplePinch

        //public event EventHandler<SimplePinchStartedEventArgs> SimplePinchStarted
        //{
        //    add { SimplePinchStartedEventHandler += value; }
        //    remove { SimplePinchStartedEventHandler -= value; }
        //}

        //internal EventHandler<SimplePinchStartedEventArgs> SimplePinchStartedEventHandler { get; private set; }

        //public event EventHandler<SimplePinchGestureEventArgs> SimplePinchDelta
        //{
        //    add { SimplePinchDeltaEventHandler += value; }
        //    remove { SimplePinchDeltaEventHandler -= value; }
        //}

        //internal EventHandler<SimplePinchGestureEventArgs> SimplePinchDeltaEventHandler { get; private set; }

        //public event EventHandler<SimplePinchCompletedEventArgs> SimplePinchCompleted
        //{
        //    add { SimplePinchCompletedEventHandler += value; }
        //    remove { SimplePinchCompletedEventHandler -= value; }
        //}

        //internal EventHandler<SimplePinchCompletedEventArgs> SimplePinchCompletedEventHandler { get; private set; }

        //#endregion

        //#region Pinch

        ///// <summary>
        ///// The PinchStarted event.
        ///// </summary>
        //public event EventHandler<PinchStartedGestureEventArgs> PinchStarted
        //{
        //    add { PinchStartedEventHandler += value; }
        //    remove { PinchStartedEventHandler -= value; }
        //}

        ///// <summary>
        ///// Gets or sets the pinch started event handler.
        ///// </summary>
        ///// <value>The pinch started event handler.</value>
        //internal EventHandler<PinchStartedGestureEventArgs> PinchStartedEventHandler { get; private set; }

        ///// <summary>
        ///// Any two-touch point (two finger) operation.
        ///// </summary>
        //public event EventHandler<PinchGestureEventArgs> PinchDelta
        //{
        //    add { PinchDeltaEventHandler += value; }
        //    remove { PinchDeltaEventHandler -= value; }
        //}

        ///// <summary>
        ///// Gets or sets the pinch delta event handler.
        ///// </summary>
        ///// <value>The pinch delta event handler.</value>
        //internal EventHandler<PinchGestureEventArgs> PinchDeltaEventHandler { get; private set; }

        ///// <summary>
        ///// The end of a pinch operation.
        ///// </summary>
        //public event EventHandler<PinchGestureEventArgs> PinchCompleted
        //{
        //    add { PinchCompletedEventHandler += value; }
        //    remove { PinchCompletedEventHandler -= value; }
        //}

        ///// <summary>
        ///// Gets or sets the pinch completed event handler.
        ///// </summary>
        ///// <value>The pinch completed event handler.</value>
        //internal EventHandler<PinchGestureEventArgs> PinchCompletedEventHandler { get; private set; }

        //#endregion

        #region Unimplemented events
        ///// <summary>
        ///// The Flick event. Raised when a drag that was fast enough ends with a release.
        ///// </summary>
        //public event EventHandler<FlickGestureEventArgs> Flick;

        #endregion
    }
}